package main

import (
	"fmt"
)

//该函数可以接受任意个参数,这种写法和php很类似
func myPrint(args ...interface{}) {
	for _, v := range args {
		fmt.Println(v)
	}
	fmt.Println()
}

func main() {
	myPrint(1, 2, "abc", 3, 4)

	//也可以传入一个切片
	s := []interface{}{8.88, "def", 9, 10, 11}
	myPrint(s...) //需要用三个点来“展开”
}
